<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../../layuiadmin/style/admin.css" media="all">
    <style>
        .layui-table tbody tr:hover, .layui-table-hover {
            background-color: #ffffff;
        }

        .layui-table-view .layui-table {
            width: 100%;
        }

        .order_table td {
            vertical-align: text-top;
        }

        .order_goods_table tr td {
            border-style: none;
        }

        .order_goods_table td {
            vertical-align: middle;
        }
    </style>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-tab layui-tab-brief table_tab" lay-filter="order_table_tab">
            <ul class="layui-tab-title background_white">
                <li class="layui-this" lay-id="">全部订单</li>
                <li lay-id="1">待发货订单</li>
                <li lay-id="2">已发货订单</li>
            </ul>
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-body order_table">
                        <div class="layui-form search_from" lay-filter="search_from">
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label">订单号</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="order_no" placeholder="请输入" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">收货人姓名</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="full_name" placeholder="请输入" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">用户名</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="username" placeholder="请输入" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <button class="layui-btn layui-btn-sm" lay-filter="search_button" lay-submit>搜索</button>
                                    <button class="layui-btn layui-btn-sm layui-hide" lay-event="export_button" lay-filter="export_button" lay-submit><i class="layui-icon layui-icon-export"></i>导出</button>
                                </div>
                                <div class="layui-inline layui-font-12 search_more_button">
                                    更多搜索条件<i class="sm_iconfont icon-xiangxia"></i>
                                </div>
                            </div>
                            <div class="layui-form-item layui-hide">
                                <div class="layui-inline">
                                    <label class="layui-form-label">收货人电话</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="tel" placeholder="请输入" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">交易单号</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="trade_no" placeholder="请输入" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">商家</label>
                                    <div class="layui-input-inline">
                                        <script type="text/html" template lay-url="{{ layui.setter.apiHost }}/seller/seller/select" lay-done="layui.form.render();">
                                            <select name="seller_id" lay-filter="seller_id" lay-search="">
                                                <option value=""></option>
                                                {{# layui.each(d.data, function(index, item){ }}
                                                <option value="{{ item.id }}" {{# if(item.id== d.params.seller_id){ }}selected{{# } }}>{{ item.title }}</option>
                                                {{# }); }}
                                            </select>
                                        </script>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">状态</label>
                                    <div class="layui-input-inline">
                                        <script type="text/html" template lay-url="{{ layui.setter.apiHost }}/order/order/get_status" lay-done="layui.form.render();">
                                            <select name="brand_id" lay-search="">
                                                <option value=""></option>
                                                {{# layui.each(d.data, function(index, item){ }}
                                                <option value="{{ index }}">{{ item }}</option>
                                                {{# }); }}
                                            </select>
                                        </script>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">时间类型</label>
                                    <div class="layui-input-inline">
                                        <select name="time_type">
                                            <option value="created_at" selectd>创建时间</option>
                                            <option value="pay_at">支付时间</option>
                                            <option value="send_at">发货时间</option>
                                            <option value="done_at">确认收货时间</option>
                                            <option value="complete_at">完成时间</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline" id="select_at">
                                    <label class="layui-form-label">起止时间：</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="time_range" id="time_range" placeholder="请选择" autocomplete="off" class="layui-input" readonly>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">订单ID</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="id" placeholder="请输入" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">第三方单号</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="payment_no" placeholder="请输入" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <table class="layui-hide" id="table_list" lay-filter="table_list"></table>

                        <script type="text/html" id="toolbar">
                            <div class="layui-btn-container">
                                <button class="layui-btn layui-btn-sm layui-hide" lay-event="delivery">批量发货(电子面单)</button>
                                <button class="layui-btn layui-btn-sm layui-hide" lay-event="print_goods">批量打印发货单</button>
                                <button class="layui-btn layui-btn-sm layui-hide" lay-event="print_delivery">批量打印快递单</button>
                            </div>
                        </script>
                        <script type="text/html" id="action_button">
                            <a class="layui-btn layui-btn-xs layui-hide" lay-event="detail">订单详情</a>
                            {{# if(d.status != 0 && d.status != 10 && d.status != 11){ }}
                            <br><a class="layui-btn layui-btn-xs layui-btn-normal layui-hide" lay-event="print_goods">发货单</a>
                            <br><a class="layui-btn layui-btn-xs layui-hide" lay-event="print_delivery">快递单</a>
                            {{# } }}
                            {{# if(d.status == 1){ }}
                            <br><a class="layui-btn layui-btn-xs layui-btn-normal layui-hide" lay-event="delivery">电子面单</a>
                            {{# } }}
                            {{# if(d.status == 0){ }}
                            <br><a class="layui-btn layui-btn-xs layui-btn-danger layui-hide" lay-event="update_price">改价</a>
                            {{# } }}
                            {{# if(d.status == 0 || d.status == 1){ }}
                            <br><a class="layui-btn layui-btn-xs layui-btn-warm layui-hide" lay-event="update_address">修改地址</a>
                            {{# } }}
                        </script>
                        <script type="text/html" id="goods_tmp">
                            <table class="layui-table order_goods_table">
                                <colgroup>
                                    <col class="td_col_width_80">
                                    <col>
                                    <col class="td_col_width_100">
                                    <col class="td_col_width_100">
                                </colgroup>
                                <tr>
                                    <td colspan="4">
                                        {{# if(d.flag == 1){ }}
                                        <span class="layui-badge">风险</span>
                                        {{# } else { }}
                                        <span class="layui-badge layui-bg-green">正常</span>
                                        {{# } }}
                                        订单号：{{ d.order_no }}&nbsp;下单时间：{{ d.created_at }} 订单id：{{ d.id }}
                                    </td>
                                </tr>
                                {{# layui.each(d.goods, function(index, item){ }}
                                <tr>
                                    <td>
                                        {{# if(item.image != ''){ }}
                                        <a href="{{ item.image }}" target="_blank">
                                            <img src="{{ layui.common.image_resize(item.image, 75, 75) }}">
                                        </a>
                                        {{# } }}
                                    </td>
                                    <td>
                                        {{ item.goods_title }}<br>
                                        <span class="layui-font-gray">{{ item.spec_value }}</span>
                                    </td>
                                    <td>{{ item.sell_price }} ×️ {{ item.buy_qty }}</td>
                                    <td>{{ item.refund }}</td>
                                </tr>
                                {{# }); }}
                            </table>
                        </script>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>

<script src="../../../../layuiadmin/layui/layui.js"></script>
<script>
    layui.config({
        base: '../../../../layuiadmin/',//静态资源所在路径
        version: true
    }).extend({
        index: 'modules/admin/index',//主入口模块
        order: 'admin/order',
        order_detail: 'admin/order_detail',
    }).use(['index', 'order'], function () {

    });
</script>
</body>
</html>
